package monster.com.cvh.bean;

import java.util.Objects;

/**
 * @author: pengguanming
 * @data: 2018/4/22
 * @function:简历个人信息Bean
 */
public class PersonalBasicBean implements Cloneable {

    /**
     * code : 1
     * data : {"birthday":"2001年10月13日","email":"dfa@qq.com","gender":"女","marriage":"已婚","name":"test","native_place":"test","party":"test","phone":"13800138000","qq":"12345689","race":"test","wechat":"we23r"}
     * msg : ok
     */

    private int code;
    private DataBean data;
    private String msg;

    @Override
    public Object clone() {
        PersonalBasicBean personalBasicBean = null;
        try {
            personalBasicBean = (PersonalBasicBean) super.clone();   //浅复制
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        personalBasicBean.data = (DataBean) data.clone();   //深度复制
        return personalBasicBean;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static class DataBean implements Cloneable {

        @Override
        public Object clone() {
            DataBean dataBean = null;
            try {
                dataBean = (DataBean) super.clone();
            } catch (CloneNotSupportedException e) {
                e.printStackTrace();
            }
            return dataBean;
        }

        @Override
        public String toString() {
            return "DataBean{" +
                    "birthday='" + birthday + '\'' +
                    ", email='" + email + '\'' +
                    ", gender='" + gender + '\'' +
                    ", marriage='" + marriage + '\'' +
                    ", name='" + name + '\'' +
                    ", native_place='" + native_place + '\'' +
                    ", party='" + party + '\'' +
                    ", phone='" + phone + '\'' +
                    ", qq='" + qq + '\'' +
                    ", race='" + race + '\'' +
                    ", wechat='" + wechat + '\'' +
                    '}';
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof DataBean)) return false;
            DataBean dataBean = (DataBean) o;
            return Objects.equals(getBirthday(), dataBean.getBirthday()) &&
                    Objects.equals(getEmail(), dataBean.getEmail()) &&
                    Objects.equals(getGender(), dataBean.getGender()) &&
                    Objects.equals(getMarriage(), dataBean.getMarriage()) &&
                    Objects.equals(getName(), dataBean.getName()) &&
                    Objects.equals(getNative_place(), dataBean.getNative_place()) &&
                    Objects.equals(getParty(), dataBean.getParty()) &&
                    Objects.equals(getPhone(), dataBean.getPhone()) &&
                    Objects.equals(getQq(), dataBean.getQq()) &&
                    Objects.equals(getRace(), dataBean.getRace()) &&
                    Objects.equals(getWechat(), dataBean.getWechat());
        }

        @Override
        public int hashCode() {

            return Objects.hash(getBirthday(), getEmail(), getGender(), getMarriage(), getName(), getNative_place(), getParty(), getPhone(), getQq(), getRace(), getWechat());
        }

        /**
         * birthday : 2001年10月13日
         * email : dfa@qq.com
         * gender : 女
         * marriage : 已婚
         * name : test
         * native_place : test
         * party : test
         * phone : 13800138000
         * qq : 12345689
         * race : test
         * wechat : we23r
         */


        private String birthday;
        private String email;
        private String gender;
        private String marriage;
        private String name;
        private String native_place;
        private String party;
        private String phone;
        private String qq;
        private String race;
        private String wechat;

        public String getBirthday() {
            return birthday;
        }

        public void setBirthday(String birthday) {
            this.birthday = birthday;
        }

        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public String getGender() {
            return gender;
        }

        public void setGender(String gender) {
            this.gender = gender;
        }

        public String getMarriage() {
            return marriage;
        }

        public void setMarriage(String marriage) {
            this.marriage = marriage;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getNative_place() {
            return native_place;
        }

        public void setNative_place(String native_place) {
            this.native_place = native_place;
        }

        public String getParty() {
            return party;
        }

        public void setParty(String party) {
            this.party = party;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getQq() {
            return qq;
        }

        public void setQq(String qq) {
            this.qq = qq;
        }

        public String getRace() {
            return race;
        }

        public void setRace(String race) {
            this.race = race;
        }

        public String getWechat() {
            return wechat;
        }

        public void setWechat(String wechat) {
            this.wechat = wechat;
        }
    }
}
